

class data {
  pack(command, raw){
    const head = Buffer.allocUnsafe(4);
    head.writeInt32LE(command.length+raw.length, 0);
    const totalLength = command.length +raw.length + head.length;
    const ret = Buffer.concat([head, command, raw], totalLength);
    console.log(ret);
    return ret;
  }

}

module.exports = new data